class ApiVisitLog < ActiveRecord::Base

  attr_accessible :client_id, :debug, :remote_ip, :api_version, :request_type,
  :request, :request_data, :response, :response_status, :duration, :warned
    
  scope :after_date, lambda {|date| where(["created_at >= ?", date])}
  scope :before_date, lambda {|date| where(["created_at < ?", 1.days.since(Time.zone.parse(date)).strftime("%Y-%m-%d")])}

end
